package com.qxp.simplerpc.utils;

import com.qxp.simplerpc.entity.Monitor;
import com.qxp.simplerpc.entity.Registry;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "spring.simplerpc")
@Component
public class SimpleRpcProperties {
    // 服务器地址
    private String host;
    // 端口
    private int port;

    private int bossThreadn;

    private int workThreadn;

    private int clientThreadn;

    private boolean server;

    private boolean client;

    private String proxyType;

    private boolean ssl;

    private Registry registry;

    private Monitor monitor;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getBossThreadn() {
        return bossThreadn;
    }

    public void setBossThreadn(int bossThreadn) {
        this.bossThreadn = bossThreadn;
    }

    public int getWorkThreadn() {
        return workThreadn;
    }

    public void setWorkThreadn(int workThreadn) {
        this.workThreadn = workThreadn;
    }

    public int getClientThreadn() {
        return clientThreadn;
    }

    public void setClientThreadn(int clientThreadn) {
        this.clientThreadn = clientThreadn;
    }

    public boolean isServer() {
        return server;
    }

    public void setServer(boolean server) {
        this.server = server;
    }

    public String getProxyType() {
        return proxyType;
    }

    public void setProxyType(String proxyType) {
        this.proxyType = proxyType;
    }

    public boolean isSsl() {
        return ssl;
    }

    public void setSsl(boolean ssl) {
        this.ssl = ssl;
    }

    public boolean isClient() {
        return client;
    }

    public void setClient(boolean client) {
        this.client = client;
    }

    public Registry getRegistry() {
        return registry;
    }

    public void setRegistry(Registry registry) {
        this.registry = registry;
    }


    public Monitor getMonitor() {
        return monitor;
    }

    public void setMonitor(Monitor monitor) {
        this.monitor = monitor;
    }
}
